<?php
/**
 * Created by Zhy
 * User: Zhy
 * Date: 2018/6/21
 * Time: 10:21
 */

namespace app\common\model;


use think\Model;

class Areas extends Model
{
    protected $table = 'up_area';
    protected $hidden = ['level', 'pid'];
    
    public function shi(){
        return $this->hasMany('Area', 'pid', 'district_id');
    }
    public static  function getShengShi(){
        $lists = self::with('shi')->where('level', 1)->select();
        return $lists;
    }
}